﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication
{
    public partial class Index : System.Web.UI.Page
    {
        DLog.ILog.ILogger logger;
        protected void Page_Load(object sender, EventArgs e)
        {
            logger = DLog.LogManager.LogManager.GetCurrentClassLogger();
            logger.Debug("进入页面加载事件,换用Repository模式");
            logger.Info("操作成功！");
            Response.Write("Index加载成功！");
        }

        protected void btnLog_Click(object sender, EventArgs e)
        {
            logger.Debug(new Exception("记录异常"));
            logger.Info("你在"+DateTime.Now.ToString()+"的时候点击了按钮");
        }
    }
}